<!-- 主页 -->
<template>
  <div>
    <router-view></router-view>
    <audio-music/>
    <!-- 底部 -->
    <van-tabbar v-model="active">
      <van-tabbar-item icon="home-o" @click="toMainPage">主页</van-tabbar-item>
      <van-tabbar-item icon="friends-o" @click="toMyCenter">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
import AudioMusic from '../components/audioMusic.vue';
export default {
    data() {
        return {
            active: 0, // 底部标签索引
        };
    },
    methods: {
        // 主页
        toMainPage() {
            this.active = 0;
            this.$router.push("/");
        },
        // 去我的页面
        toMyCenter() {
            this.active = 1;
            this.$router.push("/personalCenter");
        },
    },
    components: { AudioMusic }
}
</script>

<style scoped>

</style>
